﻿@model IEnumerable<TGIApp.Model.EventVenue>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Event
        </th>
        <th>
            Venue
        </th>
        <th>
            Show Name
        </th>
        <th>
            Show Date Time
        </th>
        <th>
            Description
        </th>
        <th>
            ImageUrl
        </th>
        <th>
            Template
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
           @* @Html.DisplayFor(modelItem => item.Event_Id)*@
            @Html.DisplayFor(modelItem => item.Event.Name)
        </td>
        <td>
           @* @Html.DisplayFor(modelItem => item.Venue_Id)*@
            @Html.DisplayFor(modelItem => item.Venue.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShowName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShowDateTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ImageUrl)
        </td>
        <td>
            @*@Html.DisplayFor(modelItem => item.Template_Id)*@
            @Html.DisplayFor(modelItem => item.TicketTemplate.Name)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
